$(function () {
    $.ajax({
        url:"http://localhost:8080/back/font/nav",
        dataType:"json",
        headers:{'username':localStorage.getItem("loginUser")},
        success:function (data) {
            console.log("导航返回信息",data)
            setNav(data.data)
        }
    })
})


//设置导航内容
function setNav(data) {
    let val = '';

    data.forEach(function (value,index){
       
        val+='<div><a href="'+value.href+'">'+value.title+'</a></div>'
        $(".nav > div").html(val)
    })
}